package com.wenzhi.java_join_kotlin.controller
// package com 不会扫到该controller包，注意下

import com.wenzhi.java_join_kotlin.model.JavaStudent
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

// idea 复制.java文件到.kt文件，自动转换
@RestController
@RequestMapping("/student")
class KotlinStudentController {
    @GetMapping("/kotlin")
    fun sayKotlin(): String {
        val javaStudent = JavaStudent("kotlin")
        // return "Kotlin"
        return javaStudent.name
    }
}
